<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>重设密码</title>

    <script charset="utf-8" type="text/javascript" src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <script charset="utf-8" type="text/javascript" src="/js/com.wxd.js"></script>

    <link rel="stylesheet" type="text/css" href="/style/com.wxd.css"/>

    <style>
        html, body {
            display: block;width: 100%;height: 100%;overflow: hidden;background: rgb(255, 255, 255);
            font-size: 14px;
        }
    </style>

    <script>
        function resetPwd() {
            let urlQuery = new wxd.Map().loadSearch();
            urlQuery.put("pwd", $("#pwd").val());
            wxd.netty.post("/user/resetpwd", urlQuery.toString(),
                function (responseText) {
                    if (responseText.code !== 1) {
                        window.parent.parentNotice(responseText.msg);
                    } else {
                        window.parent.parentAlert("完成");
                    }
                },
                (errorMsg) => {
                    window.parent.parentAlert("异常：" + errorMsg);
                }
            );
        }
    </script>

</head>
<body>
<div class="btn_box" style="position: absolute;left: 50%;top: 50%;transform: translate(-50%,-50%);width: 380px;text-align: center;padding: 3px;">
    <label for="pwd">新密码：</label><input type="password" id="pwd" style="width: 260px;">
    <br>
    <br>
    <button class="tijiao" onclick="resetPwd();">提交</button>
</div>
</body>
</html>